{{if $template != 'pagereceipt' && $template != 'pagecontract'}}
  <title>{{$smarty.const.APPLICATION_NAME|escape:'html'}} - Pozzolana Web Development</title>
{{else}}
 <title id="app_name"></title>
{{/if}}
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="We provide high quality website design, hosting, maintenance, promotion and e-commerce services to business throughout the worldwide. ">
<meta name="keywords" content="pozzoalana, pozzoalana website design, pozzoalana web, pozzoalana design, web, design, website design, hosting, maintance, web site, designing, designer, developer, macromedia flash, e-shop, e-commerce, e commerce, online, store, shop">
<link rel="stylesheet" title="Default" type="text/css" charset="UTF-8" href="{{#styleSheetName#|escape:'html'}}.css" media="screen, all">
<link rel="shortcut icon" href="favicon.ico" type="image/vnd.microsoft.icon">
<script type="text/javascript">
/*var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-10473213-5']);
_gaq.push(['_trackPageview']);
(function() {
  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();*/

function customerId(customerId) {
  if (customerId < 100000 && customerId >= 10000) {
    customerId = customerId;
  } else if (customerId < 10000 && customerId >= 1000) {
    customerId = '0' + customerId;
  } else if (customerId < 1000 && customerId >= 100) {
    customerId = '00' + customerId;
  } if (customerId < 100 && customerId >= 10) {
    customerId = '000' + customerId;
  } if (customerId < 10 && customerId > 0) {
    customerId = '0000' + customerId;
  }
  return customerId;
};

if ('{{$template|escape:'javascript'}}' == 'pagecontract') {
  document.getElementById('app_name').innerHTML =  '{{$smarty.const.BRANCH|escape:'html'}}' + customerId(JSON.parse('{{$options|escape:javascript}}').id) + '  ' + 'bookingform';
} else if ('{{$template|escape:'javascript'}}' == 'pagereceipt') {
  document.getElementById('app_name').innerHTML ='{{$smarty.const.BRANCH|escape:'html'}}' + customerId(JSON.parse('{{$options|escape:javascript}}').id) + '  ' +'receipt';
}
</script>
